﻿using System.Collections.Generic;
using NewsPortal.DataContracts;

namespace NewsPortal.Models
{
    public class NewsModel
    {
        private readonly List<Category> categoriesList = new List<Category>();
        public void AddNews(Category category, News newses)
        {
            CurrentCategory = category;
            News = newses;
        }
        public void AddCategores(IEnumerable<Category> list)
        {
            categoriesList.AddRange(list);
        }        
        public News News { get; private set; }
        public Category CurrentCategory { get; private set; }
        public Category[] Categories
        {
            get
            {
                return categoriesList.ToArray();
            }
        }
    }
}